package com.kfm.springmybatis.dao;

import com.kfm.springmybatis.model.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author zcj
* @description 针对表【user】的数据库操作Mapper
* @createDate 2023-11-07 20:01:09
* @Entity com.kfm.springmybatis.model.User
*/

@Mapper
public interface UserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> selectAllByRolesUsers();

    /**
     * 通过 角色编号 查询所有用户信息
     * @param rid
     * @return
     */

    List<User> selectByRid(Integer rid);


    List<User> selectOneByUsernameAndPasswordInt(String username,String password);

    List<User> selectById(Integer id);
}
